---
layout: m1x_soap
title: Customer Address
---
				    
<h4><a name="CustomerAddress-CustomerAddress"></a>Customer Address</h4>

<p>Allows you to create, retrieve, update, and delete address data for a required customer.</p>

<p><b>Resource Name</b>: customer_address</p>

<p><b>Methods</b>:</p>
<ul>
	<li><a href="customer_address.list.html" title="customer_address.list">customer_address.list</a> &#45; Retrieve the list of customer addresses</li>
	<li><a href="customer_address.create.html" title="customer_address.create">customer_address.create</a> &#45; Create a new address for a customer</li>
	<li><a href="customer_address.info.html" title="customer_address.info">customer_address.info</a> &#45; Retrieve the specified customer address</li>
	<li><a href="customer_address.update.html" title="customer_address.update">customer_address.update</a> &#45; Update the customer address</li>
	<li><a href="customer_address.delete.html" title="customer_address.delete">customer_address.delete</a> &#45; Delete the customer address</li>
</ul>


<h4><a name="CustomerAddress-Faults"></a>Faults</h4>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 100 </td>
<td> Invalid address data. Details in error message. </td>
</tr>
<tr>
<td> 101 </td>
<td> Customer not exists. </td>
</tr>
<tr>
<td> 102 </td>
<td> Address not exists. </td>
</tr>
<tr>
<td> 103 </td>
<td> Address not deleted. Details in error message. </td>
</tr>
</tbody></table>


<h4><a name="CustomerAddress-Examples"></a>Examples</h4>

<h5><a name="CustomerAddress-Example1.Workingwithcustomeraddress"></a>Example 1. Working with customer address</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');


// Create new customer
$newCustomer = array(
    'firstname'  =&gt; 'First',
    'lastname'   =&gt; 'Last',
    'email'      =&gt; 'test@example.com',
    'password'   =&gt; 'password',
    'store_id'   =&gt; 0,
    'website_id' =&gt; 0
);

$newCustomerId = $proxy-&gt;call($sessionId, 'customer.create', array($newCustomer));

//Create new customer address
$newCustomerAddress = array(
    'firstname'  =&gt; 'First',
    'lastname'   =&gt; 'Last',
    'country_id' =&gt; 'USA',
    'region_id'  =&gt; '43',
    'region'     =&gt; 'New York',
    'city'       =&gt; 'New York',
    'street'     =&gt; array('street1','street2'),
    'telephone'  =&gt; '5555-555',
    'postcode'   =&gt; 10021,

    'is_default_billing'  =&gt; true,
    'is_default_shipping' =&gt; true
);

$newAddressId = $proxy-&gt;call($sessionId, 'customer_address.create', array($newCustomerId, $newCustomerAddress));

var_dump($proxy-&gt;call($sessionId, 'customer_address.list', $newCustomerId));

//Update customer address
$proxy-&gt;call($sessionId, 'customer_address.update', array($newAddressId, array('firstname'=&gt;'Changed Firstname')));

var_dump($proxy-&gt;call($sessionId, 'customer_address.list', $newCustomerId));

// Delete customer address
$proxy-&gt;call($sessionId, 'customer_address.delete', $newAddressId);

var_dump($proxy-&gt;call($sessionId, 'customer_address.list', $newCustomerId));</pre>
		</div>
</div></div>

				    
Create the Magento file system owner                   			    
